<?php
// Check for empty fields
if(empty($_POST['email'])  		||
   empty($_POST['password'])  		||
   empty($_POST['name']) 		||
   empty($_POST['year']) 		||
   empty($_POST['month']) 		||
   empty($_POST['day']) 		||
   empty($_POST['gender'])		||
   !filter_var($_POST['email'],FILTER_VALIDATE_EMAIL))
   {
	echo "No arguments Provided!";
	return false;
   }

$email = $_POST['email'];
$password = $_POST['password'];
$name = $_POST['name'];
$year = $_POST['year'];
$month = $_POST['month'];
$day = $_POST['day'];
$gender = $_POST['gender'];
	
// Create the email and send the message
$to = 'jogewashington@gmail.com'; // Add your email address inbetween the '' replacing jogewashington@gmail.com - This is where the form will send a message to.
$email_subject = "Website Contact Form:  $name";
$email_body = "You have received a new message from your website contact form.\n\n"."Here are the details:\n\nName: $name\n\nEmail: $email\n\nBirth: $year-$month-$day\n\ngender:\n$gender";
$headers = "From: jogewashington@gmail.com\n"; // This is the email address the generated message will be from. We recommend using something like noreply@yourdomain.com.
$headers .= "Reply-To: $email";	
mail($to,$email_subject,$email_body,$headers);
return true;			
?>